package Work1_;

import java.io.*;

/*
 *@Student 张策
 */
public class ma1 {
    public static void main(String[] args) throws IOException {
        String s="e:\\T2";
        File file = new File(s);
        if(!file.exists()){
            if(file.mkdir()){
                System.out.println("创建成功");
            }
        }
        String s2=s+"\\main.txt";
      File  file2=new File(s2);
        if (!file2.exists()){
            if(file2.createNewFile()){
                System.out.println("创建成功");
                BufferedWriter bufferedReader = new BufferedWriter(new FileWriter(s2));
                bufferedReader.write("aaaaaaaaaaa");
                if (bufferedReader!=null)
                bufferedReader.close();
            }
        }
    }
}
